<div id="main_content">
	<div class="title_action">
		<span class="title">{@pp:title}</span>
		<pp:dynamic name="authorized2">
		<div class="action_box">
			<div class="action_img">
				<ul>
					<li><a href="todos.php?id={@pp:id}&action=edit{@pp:public}" class="action_edit">Bearbeiten</a></li>
					<li><a href="todos.php?id={@pp:id}&action=delete{@pp:public}" class="action_delete">L&ouml;schen</a></li>				
				</ul>
			</div>
		</div>
		</pp:dynamic>
	</div>
	<div class="clearer">&nbsp;</div>
	<p>
		{@pp:text}
	</p>
	<div id="personen">
		<div id="select_user">
			<div class="block_border_dark">
				<h2>Benutzer ausw&auml;hlen:</h2>
				<div class="seperator">&nbsp;</div>
				<div id="user_options">&nbsp;</div><br />
				<input type="button" onclick="addUser({@pp:id});" value="Hinzuf&uuml;gen"/> <input type="button" onclick="closePopUp();" value="Abbrechen" />
			</div>
		</div>
		<h2>Personen: <pp:dynamic name="authorized"><a href="javascript:void(0);" class="action_add" onclick="showAddUser();">Benutzer hinzuf&uuml;gen</a></pp:dynamic></h2>
		<ul id="all_users">
		<pp:dynamic name="user">
			<li id="todo_user_{@pp:tId}_{@pp:id}">
				<script type="text/javascript">
				<!--
					$(document).ready(function() {usedIds.push({@pp:id});});
				//-->
				</script>
				
				<pp:dynamic name="ersteller">
					<a href="javascript:void(0);" onclick="deleteUser({@pp:id}, {@pp:tId});" class="action_unlink"> 
						<img src="{@pp:core}{@pp:tpl_folder}/img/actions/unlink.png"/>
					</a>
				</pp:dynamic>
				<a href="profile.php?id={@pp:id}">{@pp:name} {@pp:extra}</a> 
			</li>
		</pp:dynamic>
		</ul>
	</div>
	<br />
	<div id="projekte">
		<div id="select_project">
			<div class="block_border_dark">
				<h2>Projekt ausw&auml;hlen:</h2>
				<div class="seperator">&nbsp;</div>
				<div id="project_options">&nbsp;</div><br />
				<input type="button" onclick="addProject({@pp:id});" value="Hinzuf&uuml;gen"/> <input type="button" onclick="closePopUp();" value="Abbrechen" />
			</div>
		</div>
		<h2>Projekte: <a href="javascript:void(0);" class="action_add" onclick="showAddProject();" >zu Projekt hinzuf&uuml;gen</a></h2>
		<ul id="all_projects">
		<pp:dynamic name="projects">
			<li id="todo_project_{@pp:tId}_{@pp:id}">
				<script type="text/javascript">
					<!--
						$(document).ready(function() {usedPIds.push({@pp:id});});
					//-->
				</script>
				<a href="javascript:void(0);" onclick="deleteProject({@pp:id}, {@pp:tId});" class="action_unlink"> 
					<img src="{@pp:core}{@pp:tpl_folder}/img/actions/unlink.png"/>
				</a>
				<a href="projects.php?id={@pp:id}">{@pp:title}</a> 
			</li>
		</pp:dynamic>
		</ul>
	</div>
	<div class="clearer">&nbsp;</div>
	<br />
	<div id="messages" >
	     <h2>{@pp:msg_count} Nachrichten</h2>
	     <div class="block_content block_border">
	     	<pp:dynamic name="messages">
	 		<div class="message_block2">
	 			<span class="title">{@pp:title}</span>
	 			<span class="meta">am {@pp:date} von <a href="profile.php?id={@pp:u_id}">{@pp:u_name}</a></span>
	 			<div class="content">
	 				{@pp:text}
	 				<span class="reply_count action_msg_count"><a href="discussions.php?tID={@pp:tId}">{@pp:reply_count} Antwort(en)</a></span>
	 			</div>
	 		</div>
	 		</pp:dynamic>
	 		<pp:dynamic name="no_msgs">
			<div class="no_messages">Keine Nachrichten vorhanden</div>
			</pp:dynamic>
	 		<div id="message_actions">
	 			<a href="discussions.php?tID={@pp:id}">Alle Nachrichten anzeigen</a>
	 		</div>
	 		<div class="clearer">&nbsp;</div>
		</div>
	</div>	
	<div class="clearer">&nbsp;</div>
</div>
<script type="text/javascript">
<!--
	var alreadyAdded = '<span class="msg_error">Dieser User ist schon zum Todo hinzugef&uuml;gt.</span>';
	var alreadyAddedP = '<span class="msg_error">Dieses Projekt ist schon zum Todo hinzugef&uuml;gt.</span>';
	var addUSuccess = '<span class="msg_info">Der User wurde erfolgreich hinzugef&uuml;gt.</span>';
	var deleteUSuccess = '<span class="msg_info">Der User wurde erfolgreich gel&ouml;scht.</span>';
	var addPSuccess = '<span class="msg_info">Das Projekt wurde erfolgreich hinzugef&uuml;gt.</span>';
	var deletePSuccess = '<span class="msg_info">Das Projekt wurde erfolgreich gel&ouml;scht.</span>';
	var newUser = new Array('<li id="todo_user_{@pp:tId}_', '"><a href="profile.php?id=', '">', '</a> <a href="javascript:void(0);" onclick="deleteUser(', ',', ');" class="action_unlink"> <img src="{@pp:core}{@pp:tpl_folder}/img/actions/unlink.png"/></a></li>');
	var newProject = new Array('<li id="todo_project_{@pp:tId}_', '"><a href="projects.php?id=', '">', '</a> <a href="javascript:void(0);" onclick="deleteProject(', ', ', ');" class="action_unlink"> <img src="{@pp:core}{@pp:tpl_folder}/img/actions/unlink.png"/></a></li>');
	
//-->
</script>